﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.dataaccess.model
{
    [XrmEntity("new_equipment", "new_equipmentid")]
    public class Equipment
    {
        [XrmFieldMapping("new_equipmentId", XrmAttributeType.UniqueIdentifier)]
        public System.Guid new_equipmentId { get; set; }

        [XrmFieldMapping("CreatedOn", XrmAttributeType.DateTime,true)]
        public Nullable<System.DateTime> CreatedOn { get; set; }

        [XrmFieldMapping("CreatedBy", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("systemuser", default(string))]
        public Nullable<System.Guid> CreatedBy { get; set; }

        [XrmFieldMapping("CreatedOn", XrmAttributeType.DateTime, true)]
        public Nullable<System.DateTime> ModifiedOn { get; set; }

        [XrmFieldMapping("ModifiedBy", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("systemuser", default(string))]
        public Nullable<System.Guid> ModifiedBy { get; set; }

        [XrmFieldMapping("statecode", XrmAttributeType.Int, true)]
        public int statecode { get; set; }

        [XrmFieldMapping("new_name", XrmAttributeType.String, true)]
        public string new_name { get; set; }

        [XrmFieldMapping("new_type", XrmAttributeType.XrmOptionSetValue, true)]
        public Nullable<int> new_type { get; set; }

        [XrmFieldMapping("new_number", XrmAttributeType.String, true)]
        public string new_number { get; set; }

        [XrmFieldMapping("new_specification", XrmAttributeType.String, true)]
        public string new_specification { get; set; }

        [XrmFieldMapping("new_unit", XrmAttributeType.XrmOptionSetValue, true)]
        public Nullable<int> new_unit { get; set; }

        [XrmFieldMapping("new_price", XrmAttributeType.Decimal, true)]
        public Nullable<decimal> new_price { get; set; }

        [XrmFieldMapping("new_price", XrmAttributeType.UniqueIdentifier, true)]
        public Nullable<System.Guid> TransactionCurrencyId { get; set; }

        [XrmFieldMapping("ExchangeRate", XrmAttributeType.Decimal, true)]
        public Nullable<decimal> ExchangeRate { get; set; }

        [XrmFieldMapping("new_price_Base", XrmAttributeType.Decimal, true)]
        public Nullable<decimal> new_price_Base { get; set; }

        [XrmFieldMapping("new_point", XrmAttributeType.Decimal, true)]
        public Nullable<int> new_point { get; set; }

        [XrmFieldMapping("new_salesliterature", XrmAttributeType.UniqueIdentifier, true)]
        [XrmReferenceType("salesliterature", default(string))]
        public Nullable<System.Guid> new_salesliterature { get; set; }
    }
}
